package com.cnswhy.cloud.server.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author cnswhy
 * @since 2020-10-16
 */
@Data
@ToString(callSuper = true)
@ApiModel(value = "SpellOrderDetail", description = "")
public class SpellOrderDetail extends SpellOrder {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "")
    @Length(max = 100, message = "长度不能超过100")
    @TableField(value = "title", condition = LIKE)
    @Excel(name = "拼团区间")
    private String title;
    /**
     * 缩略图
     */
    @ApiModelProperty(value = "缩略图")
    @NotEmpty(message = "缩略图不能为空")
    @Length(max = 255, message = "缩略图长度不能超过255")
    @TableField(value = "thumbnail_img", condition = LIKE)
    @Excel(name = "")
    private String thumbnailImg;

    @TableField(value = "url")
    @Excel(name = "")
    private String url;
    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称")
    @NotEmpty(message = "商品名称不能为空")
    @Length(max = 255, message = "商品名称长度不能超过255")
    @TableField(value = "product_name", condition = LIKE)
    @Excel(name = "商品名称")
    private String productName;


    /**
     * 收货人姓名
     */
    @ApiModelProperty(value = "收货人姓名")
    @Length(max = 50, message = "收货人姓名长度不能超过50")
    @TableField(value = "receiver", condition = LIKE)
    @Excel(name = "收货人姓名")
    private String receiver;

    /**
     * 收货地区
     */
    @ApiModelProperty(value = "收货地区")
    @Length(max = 500, message = "收货地区长度不能超过500")
    @TableField(value = "area", condition = LIKE)
    @Excel(name = "收货地区")
    private String area;

    /**
     * 收货地址
     */
    @ApiModelProperty(value = "收货地址")
    @Length(max = 500, message = "收货地址长度不能超过500")
    @TableField(value = "address", condition = LIKE)
    @Excel(name = "收货地址")
    private String address;

    /**
     * 手机号码
     */
    @ApiModelProperty(value = "手机号码")
    @Length(max = 20, message = "手机号码长度不能超过20")
    @TableField(value = "mobile", condition = LIKE)
    @Excel(name = "手机号码")
    private String mobile;


}
